﻿<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh-CN" class="ie8"> <![endif]-->
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>{$title}{if condition="$seoconfig.seo_title neq ''"}-{$seoconfig.seo_title}{/if}</title>
<meta name="keywords" content="{$seoconfig.seo_meta}" />
<meta name="description" content="{$seoconfig.seo_desc}"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
<meta name="csrf-param" content="_csrf">
<meta name="csrf-token" content="bHU1ajZfWXQ0BlQBZC0fNQg.TBBwDQFFLhlkWVtvNjI1DXkNTms3DA==">

<!-- 网站头像 -->
<link rel="icon" type="image/x-icon" href="__TEMP__/{$style}/public/js/jquery.js/favicon_0.ico" />
<link rel="shortcut icon" type="image/x-icon" href="__TEMP__/{$style}/public/images/favicon_0.ico" />
<link type="text/css" rel="stylesheet" href="__TEMP__/{$style}/public/css/ns_common.css">
<script type="text/javascript" src="__TEMP__/{$style}/public/js/jquery.js"></script>
<script type="text/javascript" src="__TEMP__/{$style}/public/js/common.js"></script>
<link type="text/css" rel="stylesheet" href="__TEMP__/{$style}/public/css/login.css">

</head>
<body>
	<div class="header login-header w990">
		<div class="logo-info">
			<a href="SHOP_MAIN" class="logo">
				<img alt="" src="__UPLOAD__/{$web_info['logo']}" />
			</a>
			<span class="findpw">欢迎登录</span>
		</div>
	</div>
	<div class="login-content">
		<div class="login-banner" style="background: url('__TEMP__/{$style}/public/images/login_bg_image_0.jpg') center;">
			<div class="w990 pos-r">
				
				

<div id="1486347984NGrcF8" class="login-form">
	<div class="login-con pos-r">
		<div class="login-wrap">
			<div class="login-tit">
				还没有账号？
				<a href="SHOP_MAIN/login/registerbox" class="regist-link color">
					立即注册
					<i>&gt;</i>
				</a>
			</div>
			<div class="login-radio">
				<ul>
					<li class="active" id="login2" onclick="setTab('login',2,2)" style="border:0;margin-left:86px; font-size:16px;">用户登录</li>
					<!-- <li class="" id="login1" onclick="setTab('login',1,2)">动态密码登录</li> -->
				</ul>
			</div>
			<!-- 普通登录 star -->
			<div id="con_login_2" class="form">
				<form id="form2" action="SHOP_MAIN/login/index" method="POST">
<input type="hidden" name="_csrf" value="aFd3ZHVDZlMgABAIEC41FREUNgkFcgllL2AcCEYsJAwQHQ0sJSlQFA==">
				<div class="form-group item-name">
					<!-- 错误项标注 给div另添加一个class值'error' star -->
					<div class="form-control-box">
						<i class="icon"></i>
						<input type="text" id="username" name="username" value="" class="text" tabindex="1" placeholder="已验证手机/邮箱/用户名" autocomplete="off" />
					</div>
					<!-- 错误项标注 给div另添加一个class值'error' end -->
				</div>
				<div class="form-group item-password">
					<div class="form-control-box">
						<i class="icon"></i>
						<input type="password" id="password" name="password" value="" class="text" tabindex="2" placeholder="密码" autocomplete="off" />
					</div>				
				</div>		
				<div class="safety">	
					<label for="remember">
						<input type="checkbox" value="1" name="remember" id="remember" class="checkbox" />
						<span>自动登录</span>
					</label>	
					<a class="forget-password fr" href="SHOP_MAIN/login/findpasswd">忘记密码？</a>
				</div>
				<div class="login-btn">
					<input type="hidden" name="act" value="act_login" />
					<input type="hidden" name="back_act" value="" />
					<input type="submit" name="submit" class="btn-img btn-entry bg-color" id="loginsubmit" value="立即登录" />
				</div>
				<input type="hidden" name="back_url" value="javascript::void(0)" />
</form>
			</div>
		</div>
		
	</div>
</div>

<!-- 验证码脚本 -->
<script type="text/javascript" src="__TEMP__/{$style}/public/js/jquery.captcha.js"></script>
<!-- 表单验证 -->
<script type="text/javascript" src="__TEMP__/{$style}/public/js/jquery.validate.js"></script>
<script type="text/javascript" src="__TEMP__/{$style}/public/js/jquery.validate.custom.js"></script>
<script type="text/javascript" src="__TEMP__/{$style}/public/js/messages_zh.js"></script>
<script id="client_rules" type="text/javascript">
[{"id": "loginmodel-username", "name": "LoginModel[username]", "attribute": "username", "rules": {"required":true,"messages":{"required":"请输入用户名"}}},{"id": "loginmodel-password", "name": "LoginModel[password]", "attribute": "password", "rules": {"required":true,"messages":{"required":"请输入密码"}}},{"id": "loginmodel-username", "name": "LoginModel[username]", "attribute": "username", "rules": {"string":true,"messages":{"string":"用户名必须是一条字符串。","maxlength":"用户名长度必需在100以内"},"maxlength":50}},{"id": "loginmodel-password", "name": "LoginModel[password]", "attribute": "password", "rules": {"string":true,"messages":{"string":"密码必须是一条字符串。","maxlength":"密码长度必需在32以内"},"maxlength":32}},{"id": "loginmodel-rememberme", "name": "LoginModel[rememberMe]", "attribute": "rememberMe", "rules": {"boolean":{"trueValue":"1","falseValue":"0"},"message":{"boolean":"记住用户名密码的值必须要么为\"1\"，要么为\"0\"。"}}},]
</script>
<script id="sms_client_rules" type="text/javascript">
[{"id": "smsloginmodel-mobile", "name": "SmsLoginModel[mobile]", "attribute": "mobile", "rules": {"required":true,"messages":{"required":"请输入手机号码"}}},{"id": "smsloginmodel-smscaptcha", "name": "SmsLoginModel[smsCaptcha]", "attribute": "smsCaptcha", "rules": {"required":true,"messages":{"required":"请输入动态密码"}}},{"id": "smsloginmodel-mobile", "name": "SmsLoginModel[mobile]", "attribute": "mobile", "rules": {"match":{"pattern":/^13[0-9]{1}[0-9]{8}$|15[0-9]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}$|17[0-9]{1}[0-9]{8}$|14[0-9]{1}[0-9]{8}$/,"not":false,"skipOnEmpty":1},"messages":{"match":"请输入一个有效的手机号码"}}},{"id": "smsloginmodel-rememberme", "name": "SmsLoginModel[rememberMe]", "attribute": "rememberMe", "rules": {"boolean":{"trueValue":"1","falseValue":"0"},"message":{"boolean":"记住用户名密码的值必须要么为\"1\"，要么为\"0\"。"}}},{"id": "smsloginmodel-captcha", "name": "SmsLoginModel[captcha]", "attribute": "captcha", "rules": {"required":true,"messages":{"required":"请输入图片验证码"}}},{"id": "smsloginmodel-captcha", "name": "SmsLoginModel[captcha]", "attribute": "captcha", "rules": {"captcha":{"hash":419,"hashKey":"niiCaptcha/site/captcha","caseSensitive":false},"messages":{"captcha":"验证码不正确。"}}},]
</script>
<script type="text/javascript">
	$().ready(function() {
		
		//二维码、PC登录切换
		$('.qrcode-target').click(function(){
			if($(this).hasClass('btn-qrcode')){
				$(this).removeClass('btn-qrcode').addClass('btn-login').attr('title','去电脑登录');
				$('.login-wrap').hide();
				$('.login-mobile').show();
				return;
			}
			if($(this).hasClass('btn-login')){
				$(this).removeClass('btn-login').addClass('btn-qrcode').attr('title','去手机扫码登录');
				$('.login-wrap').show();
				$('.login-mobile').hide();
			}
		});
		
		
		var container = $("#1486347984NGrcF8");
		
		/**
		 * 初始化validator默认值
		 */
		//先获取到默认函数，不能直接覆盖掉
		var errorPlacement = $.validator.defaults.errorPlacement;
		$.validator.setDefaults({
			errorPlacement: function(error, element) {
				$(element).parent(".form-control-box").addClass("error");
				errorPlacement.call(this, error, element);
			},
			// 失去焦点验证
			onfocusout: function(element) {
				$(element).valid();
			},
			// 成功后移除错误提示
			success: function(error) {
				var error_id = $(error).attr("id");
				var element_id = $(error).attr("for");
				// 移除错误样式
				$("[id='"+error_id+"']").remove();
				$(":input[id='"+element_id+"']").parent(".form-control-box").removeClass("error");
			}
		});
		
		var validator = $(container).find("#form2").validate();
		// 验证规则，此验证规则会影响编辑器中JavaScript的的格式化操作
		$.validator.addRules($("#client_rules").html());
		
		$(container).find("#form2").submit(function() {

			if(!validator.form()){
				return false;
			}
						return true;
					});
		
		var validator1 = $(container).find("#form1").validate();
		// 验证规则，此验证规则会影响编辑器中JavaScript的的格式化操作
		$.validator.addRules($("#sms_client_rules").html());
		
		$(container).find("#form1").submit(function() {
			if(!validator1.form()){
				return false;
			}
						return true;
					});
		
		$(container).find("#btn_send_sms_code").click(function(){
			
			if($(this).prop("disabled") == true || $(this).data("doing") == true){
				return;
			}
			
			var mobile_valid = $("#mobile").valid();
			var captcha_valid = true;
			if($("#captcha_sms").size() > 0){
				captcha_valid = $("#captcha_sms").valid();
			}
			
			if(mobile_valid && captcha_valid){
				
				var target = this;
				
				$(this).data("doing", true);
				
				var mobile = $("#mobile").val();
				
				$.post('/site/sms-captcha', {
					mobile: mobile,
					captcha: $("#captcha_sms").val()
				}, function(result){
					if(result.code == 0){
						// 开始倒计时
						countdown(target, "获取手机动态验证码");
					}else{
						// 失败后点击验证码
						if($("#captcha_sms-image").size() > 0){
							$("#captcha_sms").val("");
							$("#captcha_sms-image").click();
						}
						var errors = {};
						errors["SmsLoginModel["+result.data+"]"] = result.message;
						validator1.showErrors(errors);
					}
					$(target).data("doing", false);
				}, "json");
			}
			
		});
		
		var wait = 60;
		function countdown(obj, msg) {
			obj = $(obj);

			if (wait <= 0) {
				obj.prop("disabled", false);
				obj.html(msg);
				wait = 60;
			} else {
				if (msg == undefined || msg == null) {
					msg = obj.html();
				}
				obj.prop("disabled", true);
				obj.html(wait + "秒后重新获取");
				wait--;
				setTimeout(function() {
					countdown(obj, msg)
				}, 1000)
			}
		}
	});
</script>

			</div>
		</div>
	</div>
	<!-- 底部 -->
    <div class="login-footer">
	
<!-- 底部 _start-->


<div class="site-footer">
	<div class="footer-related">	
		<div class="footer-info">
			<div class="info-text">
				<!-- 底部导航 -->
				<p class="nav-bottom">
					<a href="www.niushop.com.cn" target="_blank">订单查询</a>
				</p>
				<p>
					{$platform_shopname}<a href="www.niushop.com.cn">(www.niushop.com.cn)</a> 版权所有
					<a href="www.niushop.com.cn" target="_blank">晋ICP备16001360号-2</a>
				</p>
				
			</div>
			<div class="info-text">
			
			</div>
			<div class="copyright">
				<p><a href="www.niushop.com.cn" target="_blank" class="copyright-logo">山西牛酷信息科技有限公司&nbsp;&nbsp;提供技术支持</a></p>
			</div>
		</div>	
	</div>
</div>
<!-- 第三方流量统计 -->
<div style="display: none;">
</div>
<!-- 底部 _end-->
    </div>
</body>